<?php
  include('userlock.php');
  if($_SERVER["REQUEST_METHOD"] == "POST")
  {
    $id=$_POST['acceptID'];
    $q1=mysql_query("INSERT INTO friend (user_email,friend_email) VALUES ('$login_session','$id')");
    $q2=mysql_query("INSERT INTO friend (user_email,friend_email) VALUES ('$id','$login_session')");
    $q3=mysql_query("DELETE FROM receive_request WHERE user_email='$login_session' AND friend_email='$id'");
    $q4=mysql_query("DELETE FROM send_request WHERE user_email='$id' AND friend_email='$login_session'");
    header('Location: Receive.php?receive=1');
  }
?>